import request from '@/utils/request'

export default {
  findAll(page, limit, createTime, updateTime, addressSite) {
    return request({
      url: `/admin/pitfall/cpHiddenInfo/listPage/${page}/${limit}/${createTime}/${updateTime}/${addressSite}`,
      method: 'post',
    })
  },

  findChargingStations() {
    return request({
      url: `/admin/pitfall/cpHiddenInfo/findChargingStations`,
      method: 'post',
    })
  },

  findCpHandleCode() {
    return request({
      url: `/admin/pitfall/cpHiddenInfo/findCpHandleCode`,
      method: 'post',
    })
  },

  //删除信息
  removeById(id) {
    return request({
      url: `/admin/pitfall/cpHiddenInfo/remove/${id}`,
      method: 'delete',
      // params: searchObj,
    })
  },

  //撤回处理人
  setPersonName(id) {
    return request({
      url: `/admin/pitfall/cpHiddenInfo/setPersonName/${id}`,
      method: 'post',
      // params: searchObj,
    })
  },

  //处理人信息
  solvePerson() {
    return request({
      url: `/admin/pitfall/cpHiddenInfo/solvePerson`,
      method: 'post',
    })
  },
  //处理状态
  getHandleType() {
    return request({
      url: `/admin/pitfall/cpHiddenInfo/getHandleType`,
      method: 'post',
    })
  },
  //处理人
  getRank() {
    return request({
      url: `/admin/pitfall/cpHiddenInfo/getRank`,
      method: 'post',
    })
  },

  //充电转信息
  getChargingPile() {
    return request({
      url: '/admin/pitfall/cpHiddenInfo/getChargingPile',
      method: 'post',
    })
  },
  //充电桩型号
  getChargingPileSerialNumber(serialNumber) {
    return request({
      url: `/admin/pitfall/cpHiddenInfo/getChargingPileSerialNumber/${serialNumber}`,
      method: 'post',
    })
  },
  //全查Hidden信息
  findAllHidden() {
    return request({
      url: `/admin/pitfall/cpHiddenInfo/findAllHidden`,
      method: 'post',
    })
  },
  //删除图片
  onUploadRemove(url) {
    return request({
      url: `http://localhost:8130/api/oss/file/removeFile?url=/${url}`,
      method: 'delete',
    })
  },
  //添加信息
  dealSave(cpHidden) {
    return request({
      url: `/admin/pitfall/cpHiddenInfo/save`,
      method: 'post',
      data: cpHidden,
    })
  },
  //派发处理人
  serPerson(cpHidden) {
    return request({
      url: `/admin/pitfall/cpHiddenInfo/serPerson`,
      method: 'post',
      data: cpHidden,
    })
  },

  //根据ID查找信息
  fetchDataById(id) {
    return request({
      url: `/admin/pitfall/cpHiddenInfo/finAllHiddenById/${id}`,
      method: 'post',
    })
  },

  //根据ID查找信息
  export(id) {
    return request({
      url: `/admin/pitfall/cpHiddenInfo/export`,
      method: 'get',
    })
  },
}
